﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.CommonTables.GX.DLXRMYY
{
    /// <summary>
    /// ShuZhongFangShiDanCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class ShuZhongFangShiDanCtrl : CustomCommonTableCtrl
    {
        public ShuZhongFangShiDanCtrl()
        {
            InitializeComponent();
            IniteRadioBation();
        }
        private void IniteRadioBation()
        {
            new RadioButtonHelper().ChangeRadioSatus(qmys_y, qmys_n); new RadioButtonHelper().ChangeRadioSatus(hxdgz_y, hxdgz_n);
            new RadioButtonHelper().ChangeRadioSatus(flwx_y, flwx_n); new RadioButtonHelper().ChangeRadioSatus(zqgjn_y, zqgjn_n);
            new RadioButtonHelper().ChangeRadioSatus(qgbg_y, qgbg_n); new RadioButtonHelper().ChangeRadioSatus(hxzc_y, hxzc_n);
            new RadioButtonHelper().ChangeRadioSatus(zgnmz_y, zgnmz_n); new RadioButtonHelper().ChangeRadioSatus(cx_y, cx_n);
            new RadioButtonHelper().ChangeRadioSatus(tpg_y, tpg_n); new RadioButtonHelper().ChangeRadioSatus(ccgg_y, ccgg_n);
            new RadioButtonHelper().ChangeRadioSatus(zlxt_y, zlxt_n); new RadioButtonHelper().ChangeRadioSatus(dghcxy_y, dghcxy_n);
            new RadioButtonHelper().ChangeRadioSatus(fy_y, fy_n); new RadioButtonHelper().ChangeRadioSatus(qjm_y, qjm_n);
            new RadioButtonHelper().ChangeRadioSatus(mzxg_ws, mzxg_bws, mzxg_sb); new RadioButtonHelper().ChangeRadioSatus(zjzty_y, zjzty_n);
            new RadioButtonHelper().ChangeRadioSatus(gqm_y, gqm_n); new RadioButtonHelper().ChangeRadioSatus(sjzz_y, sjzz_n);
            new RadioButtonHelper().ChangeRadioSatus(jmdu_y, jmdu_n); new RadioButtonHelper().ChangeRadioSatus(hxkn_y, hxkn_n);
            new RadioButtonHelper().ChangeRadioSatus(mzxg_ws2, mzxg_bws2, mzxg_sb2); new RadioButtonHelper().ChangeRadioSatus(zjzty_y2, zjzty_n2);
            new RadioButtonHelper().ChangeRadioSatus(gqm_y2, gqm_n2); new RadioButtonHelper().ChangeRadioSatus(jmzz_y, jmzz_n);
            new RadioButtonHelper().ChangeRadioSatus(zrsl_y, zrsl_n); new RadioButtonHelper().ChangeRadioSatus(hxtc_n, hxtc_y);
            new RadioButtonHelper().ChangeRadioSatus(wcdm_y, wcdm_n); new RadioButtonHelper().ChangeRadioSatus(ccgc_y, ccgc_n);
            new RadioButtonHelper().ChangeRadioSatus(dmcc_yx, dmcc_yax); new RadioButtonHelper().ChangeRadioSatus(ccgcsl_y, ccgcsl_n);
            new RadioButtonHelper().ChangeRadioSatus(smtzpw_y, smtzpw_y); new RadioButtonHelper().ChangeRadioSatus(szgdxy_y, szgdxy_n);
            new RadioButtonHelper().ChangeRadioSatus(dyxz_y, dyxz_n); new RadioButtonHelper().ChangeRadioSatus(gtsxz_y, gtsxz_n);
            new RadioButtonHelper().ChangeRadioSatus(szzd_y, szzd_n); new RadioButtonHelper().ChangeRadioSatus(ywgm_y, ywgm_n);
            new RadioButtonHelper().ChangeRadioSatus(szdcx_y, szdcx_n); new RadioButtonHelper().ChangeRadioSatus(szbf, pacu,icu);
            new RadioButtonHelper().ChangeRadioSatus(smtzpw_y2, smtzpw_n2); new RadioButtonHelper().ChangeRadioSatus(sqfs1, sqfsf1, sqfsff1, sqfsfff1);
            new RadioButtonHelper().ChangeRadioSatus(jlhf_zc, jlhf_bzc); new RadioButtonHelper().ChangeRadioSatus(pcaxg_my, pcaxg_bmy);
            new RadioButtonHelper().ChangeRadioSatus(smtzpw_y3, smtzpw_n3); new RadioButtonHelper().ChangeRadioSatus(xfjc_zc, xfjc_bzc);
            new RadioButtonHelper().ChangeRadioSatus(hxxt_y, hxxt_n); new RadioButtonHelper().ChangeRadioSatus(fbgr_y, fbgr_n);
            new RadioButtonHelper().ChangeRadioSatus(hxkn_y2, hxkn_n2); new RadioButtonHelper().ChangeRadioSatus(dyxz_y2, dyxz_n2);
            new RadioButtonHelper().ChangeRadioSatus(hxsj_y, hxsj_n); new RadioButtonHelper().ChangeRadioSatus(xhxt_y, xhxt_n);
            new RadioButtonHelper().ChangeRadioSatus(yzxlsc_y, yzxlsc_n); new RadioButtonHelper().ChangeRadioSatus(xjt_y, xjt_n);
            new RadioButtonHelper().ChangeRadioSatus(xjt_y2, xjt_n2); new RadioButtonHelper().ChangeRadioSatus(rzza_y, rzza_n);
            new RadioButtonHelper().ChangeRadioSatus(szzx_y, szzx_n); new RadioButtonHelper().ChangeRadioSatus(ztgjhd_y, ztgjhd_n);
            new RadioButtonHelper().ChangeRadioSatus(ccd_y, ccd_n); new RadioButtonHelper().ChangeRadioSatus(exot_y, exot_n);
            new RadioButtonHelper().ChangeRadioSatus(nzl_y, nzl_n); new RadioButtonHelper().ChangeRadioSatus(mzmy_y, mzmy_n);
            new RadioButtonHelper().ChangeRadioSatus(mzxgbfz_y, mzxgbfz_n); new RadioButtonHelper().ChangeRadioSatus(clyj_y, clyj_n);
          
        }

        private void rq_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();

            if (cusDatePicker.Result)
            {
                rqn.Value = cusDatePicker.SelectedDateTime.Year;
                rqy.Value = cusDatePicker.SelectedDateTime.Month;
                rqr.Value = cusDatePicker.SelectedDateTime.Day;
                //rq2.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//xxxx年xx月xx日
            }

        }

        private void qxsj_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();
            if (cusDatePicker.Result)
            {

                qxsj.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//xxxx年xx月xx日
            }

        }

        private void rq2_GotFocus(object sender, RoutedEventArgs e)
        {
            CusDatePickerWin cusDatePicker = new CusDatePickerWin();
            cusDatePicker.SelectedDateTime = DateTime.Now;
            cusDatePicker.ShowDialog();

            if (cusDatePicker.Result)
            {
                rqn2.Value = cusDatePicker.SelectedDateTime.Year;
                rqy2.Value = cusDatePicker.SelectedDateTime.Month;
                rqr2.Value = cusDatePicker.SelectedDateTime.Day;
                rqs2.Value = cusDatePicker.SelectedDateTime.Hour;
                //rq2.Value = cusDatePicker.SelectedDateTime.ToString(DateFormat.DATE_FORMAT_STR_YMDHM_CN);//xxxx年xx月xx日
            }
        }
    }
}
